﻿//*** Guidance generated code ***//
using System;
using System.Collections.Generic;
using System.Diagnostics.Contracts;
using System.Linq;

namespace ProjectBase.Core.Diagnostics
{
    [ContractClassFor(typeof(IReadDao<,,>))]
    internal abstract class ReadDao<T, TID, TFilter> : IReadDao<T, TID, TFilter>
        where T : class, IPersistentObjectWithTypedId<TID>
        where TFilter : class, IFilter<TID>
    {
        public IEnumerable<T> Find(TFilter filter)
        {
            Contract.Requires(filter.Is(), "ReadDao<T, TID, TFilter>, method Find(), parameter 'filter' cannot be null");
            throw new NotImplementedException();
        }

        #region IReadDao<T,TID> Members

        public T GetById(TID id)
        {
            throw new NotImplementedException();
        }

        #endregion
    }

    [ContractClassFor(typeof(IReadDao<,>))]
    internal abstract class ReadDao<T, TID> : IReadDao<T, TID>
        where T : class, IPersistentObjectWithTypedId<TID>
    {
        public T GetById(TID id)
        {
            throw new NotImplementedException();
        }
    }
}